package com.novel.utils;

import java.util.Calendar;
import java.util.Date;

public class DateLocationUtils {

    /**
     * 校验日期是不是本月第一天
     */
    public static boolean checkIsFirstDayForMonth() {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date());
        return calendar.get(Calendar.DAY_OF_MONTH) == 1;
    }

    /**
     * 校验日期是不是本月第一天
     */
    public static boolean checkIsFirstDayForMonth(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        return calendar.get(Calendar.DAY_OF_MONTH) == 1;
    }

}